gtk4.git
8 years agogl render ops: Rename a member
Timm Bäder [Fri, 24 Nov 2017 09:24:49 +0000 (10:24 +0100)]
gl render ops: Rename a member

8 years agogl renderer: Factor out a helper function for offscreen drawing
Timm Bäder [Fri, 24 Nov 2017 09:18:51 +0000 (10:18 +0100)]
gl renderer: Factor out a helper function for offscreen drawing

8 years agogl ops: Remove dead code
Timm Bäder [Thu, 23 Nov 2017 19:01:15 +0000 (20:01 +0100)]
gl ops: Remove dead code

This is already checked further up in that function

8 years agogl renderer: Optimize text drawing
Timm Bäder [Thu, 23 Nov 2017 18:49:41 +0000 (19:49 +0100)]
gl renderer: Optimize text drawing

Text nodes will almost always end up using the exact same texture and
the same program. So, in that case we can simply add vertex data for all
the characters we need to draw and use just one draw call.

8 years agogl renderer: Remove unused VAO
Timm Bäder [Thu, 23 Nov 2017 10:30:05 +0000 (11:30 +0100)]
gl renderer: Remove unused VAO

8 years agogl renderer: Stop collecting VAOs in clear_tree
Timm Bäder [Thu, 23 Nov 2017 09:28:30 +0000 (10:28 +0100)]
gl renderer: Stop collecting VAOs in clear_tree

We don't use that part of the gl driver anymore.

8 years agogl renderer: Only check for color glyphs once per text node
Timm Bäder [Thu, 23 Nov 2017 09:10:43 +0000 (10:10 +0100)]
gl renderer: Only check for color glyphs once per text node

It does not depend on the glyph, so no need to do it once for every
glyph.

8 years agogl renderer: Implement cairo nodes again
Timm Bäder [Thu, 23 Nov 2017 09:02:58 +0000 (10:02 +0100)]
gl renderer: Implement cairo nodes again

8 years agogl renderer: Move render ops into separate file
Timm Bäder [Wed, 22 Nov 2017 20:02:50 +0000 (21:02 +0100)]
gl renderer: Move render ops into separate file

8 years agogsk: Move all gskgl* files into gl/
Timm Bäder [Wed, 22 Nov 2017 19:13:46 +0000 (20:13 +0100)]
gsk: Move all gskgl* files into gl/

8 years agogl renderer: Rework once more
Timm Bäder [Wed, 22 Nov 2017 10:32:23 +0000 (11:32 +0100)]
gl renderer: Rework once more

Last time, I swear.

8 years agogl renderer: Don't initialize modelview matrix twice
Timm Bäder [Mon, 20 Nov 2017 14:08:04 +0000 (15:08 +0100)]
gl renderer: Don't initialize modelview matrix twice

8 years agogl renderer: Group render node types by render item creation
Timm Bäder [Mon, 20 Nov 2017 13:30:46 +0000 (14:30 +0100)]
gl renderer: Group render node types by render item creation

8 years agogl renderer: Don't pass MVP to shaders
Timm Bäder [Sun, 19 Nov 2017 13:39:56 +0000 (14:39 +0100)]
gl renderer: Don't pass MVP to shaders

We already pass both modelview and projection matrix individually.

8 years agogl: Add glyph cache
Timm Bäder [Sat, 18 Nov 2017 13:30:57 +0000 (14:30 +0100)]
gl: Add glyph cache

Based on the one used by the vulkan renderer

8 years agogl renderer: Remove unused member
Timm Bäder [Fri, 17 Nov 2017 16:23:27 +0000 (17:23 +0100)]
gl renderer: Remove unused member

8 years agogl renderer: Remove unused shaders
Timm Bäder [Thu, 16 Nov 2017 20:22:02 +0000 (21:22 +0100)]
gl renderer: Remove unused shaders

8 years agotest-render-nodes: Add transformed clip nodes test
Timm Bäder [Thu, 16 Nov 2017 20:10:31 +0000 (21:10 +0100)]
test-render-nodes: Add transformed clip nodes test

8 years agoshowrendernode: Resize window to a reasonable size instead
Timm Bäder [Thu, 16 Nov 2017 20:10:09 +0000 (21:10 +0100)]
showrendernode: Resize window to a reasonable size instead

8 years agogl renderer: Save clip in every node
Timm Bäder [Thu, 16 Nov 2017 20:04:18 +0000 (21:04 +0100)]
gl renderer: Save clip in every node

8 years agogl renderer: Don't create framebuffer for texture opacity children
Timm Bäder [Thu, 16 Nov 2017 11:20:35 +0000 (12:20 +0100)]
gl renderer: Don't create framebuffer for texture opacity children

Slowly a pattern emerges...

8 years agogl renderer: Implement rounded clip nodes
Timm Bäder [Thu, 16 Nov 2017 10:41:16 +0000 (11:41 +0100)]
gl renderer: Implement rounded clip nodes

mostly a proof of concept

8 years agogl renderer: save on some frame buffers
Timm Bäder [Thu, 16 Nov 2017 08:47:19 +0000 (09:47 +0100)]
gl renderer: save on some frame buffers

If the child of a color matrix node is a texture, we can directly use
that instead of drawing it to a texture first and then using that
texture.

8 years agoGskGLDriver: Add profiler
Timm Bäder [Thu, 16 Nov 2017 08:33:20 +0000 (09:33 +0100)]
GskGLDriver: Add profiler

Count the newly created textures, the reused ones and the uploads from
cairo surfaces per frame.

8 years agoGskGLDriver: Use float for texture size in create_texture
Timm Bäder [Wed, 15 Nov 2017 17:40:57 +0000 (18:40 +0100)]
GskGLDriver: Use float for texture size in create_texture

Render nodes can end up with bounds < 1 since they are floats, and the
implicit cast to int ends up creating a texture with 0 width or height.
Use ceil() instead in create_texture so we don't have to do that on the
caller side everywhere.

8 years agotest-render-nodes: Add color matrix test
Timm Bäder [Sat, 11 Nov 2017 11:36:39 +0000 (12:36 +0100)]
test-render-nodes: Add color matrix test

8 years agotest-render-nodes: Print a warning if we didn't generate anything
Timm Bäder [Sat, 11 Nov 2017 08:58:09 +0000 (09:58 +0100)]
test-render-nodes: Print a warning if we didn't generate anything

8 years agobuild: Remove unused variable
Timm Bäder [Thu, 9 Nov 2017 08:51:57 +0000 (09:51 +0100)]
build: Remove unused variable

8 years agoadd tests/showrendernode
Timm Bäder [Sat, 11 Nov 2017 05:41:41 +0000 (06:41 +0100)]
add tests/showrendernode

A .node file viewer.

8 years agoRework the GL renderer
Timm Bäder [Fri, 3 Nov 2017 12:09:02 +0000 (13:09 +0100)]
Rework the GL renderer

8 years agogl renderer: Remove some unused code
Timm Bäder [Fri, 3 Nov 2017 12:03:44 +0000 (13:03 +0100)]
gl renderer: Remove some unused code

8 years agogl driver: Make some members const
Timm Bäder [Thu, 9 Nov 2017 09:55:14 +0000 (10:55 +0100)]
gl driver: Make some members const

8 years agoGskRenderer: Remove viewport property
Timm Bäder [Sat, 4 Nov 2017 19:05:56 +0000 (20:05 +0100)]
GskRenderer: Remove viewport property

8 years agosnapshot: Add & use API for linear gradient nodes
Timm Bäder [Wed, 13 Dec 2017 08:05:49 +0000 (09:05 +0100)]
snapshot: Add & use API for linear gradient nodes

This way, we can also clip the created node bounds to the current clip
of the GtkSnapshot. This works as long as we don't modify the start and
end points, and happens all the time while rendering.

8 years agosnapshot: Directly clip color nodes
Timm Bäder [Tue, 12 Dec 2017 19:33:53 +0000 (20:33 +0100)]
snapshot: Directly clip color nodes

Clipping a color node is trivial so we do it here directly since that
might later save the entire clip node as well as freeing the fragment
shaders from coloring lots of pixels that will be clipped away.

8 years agosnapshot: Fix typo
Timm Bäder [Tue, 12 Dec 2017 19:23:46 +0000 (20:23 +0100)]
snapshot: Fix typo

8 years agox11: Fix wrong condition when unsetting transient-for
Timm Bäder [Tue, 19 Dec 2017 10:53:31 +0000 (11:53 +0100)]
x11: Fix wrong condition when unsetting transient-for

Setting a new transient-for parent is only possible if the given parent
window is valid, not when it is NULL or valid.

8 years agoRemove font-name leftovers
Matthias Clasen [Thu, 21 Dec 2017 16:37:53 +0000 (11:37 -0500)]
Remove font-name leftovers

There were still a few places where the font-name
property was used internally.

8 years agoAdd a missing include
Matthias Clasen [Thu, 21 Dec 2017 17:18:10 +0000 (12:18 -0500)]
Add a missing include

8 years agofont button: Drop the font-name property
Matthias Clasen [Thu, 21 Dec 2017 16:10:44 +0000 (11:10 -0500)]
font button: Drop the font-name property

We already have the GtkFontChooser::font property
which serves the same purpose, so get rid of the
duplication.

8 years agotests: Stop using gtk_font_button_get_font_name
Matthias Clasen [Thu, 21 Dec 2017 16:10:13 +0000 (11:10 -0500)]
tests: Stop using gtk_font_button_get_font_name

It is going away.

8 years agoRemove debug spew
Matthias Clasen [Thu, 21 Dec 2017 13:04:26 +0000 (08:04 -0500)]
Remove debug spew

8 years agoFix a mis-merge
Matthias Clasen [Wed, 20 Dec 2017 15:36:25 +0000 (10:36 -0500)]
Fix a mis-merge

8 years agoImplement font-feature-settings
Matthias Clasen [Wed, 20 Dec 2017 15:29:33 +0000 (10:29 -0500)]
Implement font-feature-settings

This is a missing part of the CSS font level 3 module.

8 years agoUpdate the docs for GtkCssChange
Matthias Clasen [Wed, 20 Dec 2017 13:31:22 +0000 (08:31 -0500)]
Update the docs for GtkCssChange

The docs were out of sync with the flags we actually have.

8 years agogdk: Remove leftover variable
Carlos Garnacho [Tue, 19 Dec 2017 21:58:51 +0000 (22:58 +0100)]
gdk: Remove leftover variable

This is unused and leaked.

8 years agoFix a crash introduced in the previous commit
Matthias Clasen [Tue, 19 Dec 2017 19:17:55 +0000 (14:17 -0500)]
Fix a crash introduced in the previous commit

The signatures of row-inserted and row-deleted are not
identical, so we need to be a bit more careful here.

8 years agofont chooser: Simplify some code
Matthias Clasen [Tue, 19 Dec 2017 16:37:05 +0000 (11:37 -0500)]
font chooser: Simplify some code

Instead of separate handlers, just keep a single
handler for both row-inserted and row-deleted.
Slightly less work that way.

8 years agofont chooser: Stop listening to style-updated
Matthias Clasen [Tue, 19 Dec 2017 16:34:43 +0000 (11:34 -0500)]
font chooser: Stop listening to style-updated

The only time a style-updated indicates we need
to reload fonts is when it is synthesized by GtkSettings
in response to a fontconfig timestamp change, but
we are listening to those already, anyway.

8 years agogtk4-demo: Fix font-features UI file
Timm Bäder [Tue, 19 Dec 2017 08:46:27 +0000 (09:46 +0100)]
gtk4-demo: Fix font-features UI file

8 years agox11: Guard against NULL window
Timm Bäder [Tue, 19 Dec 2017 06:38:35 +0000 (07:38 +0100)]
x11: Guard against NULL window

Otherwise, the NULL parent window causes a crash in the
GDK_WINDOW_IS_DESTROYED call.

8 years agowindow: Make sure an event has a display
Timm Bäder [Mon, 18 Dec 2017 20:58:53 +0000 (21:58 +0100)]
window: Make sure an event has a display

This fixes a crash happening later on when something tries to access the
event's display.

8 years agoemoji: Skip overly wide fallback rendering
Matthias Clasen [Mon, 18 Dec 2017 03:09:08 +0000 (22:09 -0500)]
emoji: Skip overly wide fallback rendering

Some emoji fonts (such as Emoji One), render Emoji sequences
such as some of the family variations using multiple individual
glyphs. This rendering is too wide and breaks our grid layout.
Therefore, we will just skip any sequence whose rendering is
more than twice as wide as a simple smiley.

8 years agoAvoid calling unsetenv too late
Matthias Clasen [Wed, 29 Nov 2017 04:27:57 +0000 (23:27 -0500)]
Avoid calling unsetenv too late

Stash the DESKTOP_AUTOSTART_ID env var in a constructor,
before any threads have been created.

https://bugzilla.gnome.org/show_bug.cgi?id=790963

8 years agocups: Warn only once if colord is not available
Matthias Clasen [Sun, 17 Dec 2017 22:09:55 +0000 (17:09 -0500)]
cups: Warn only once if colord is not available

No need to keep complaining about this.

https://bugzilla.gnome.org/show_bug.cgi?id=791650

8 years agowayland: Handle scale 3 for cursors
Matthias Clasen [Sun, 17 Dec 2017 21:41:00 +0000 (16:41 -0500)]
wayland: Handle scale 3 for cursors

This is just a bandaid solution to make scale 3 work.
If people seriously want to go for scales larger than
that, we need a better solution.

8 years agoinspector: Allow to bump scale to 3
Matthias Clasen [Sun, 17 Dec 2017 21:40:10 +0000 (16:40 -0500)]
inspector: Allow to bump scale to 3

Might as well allow this, for 'large scale testing'.

8 years agoRemove unneeded deprecation guards
Matthias Clasen [Sun, 17 Dec 2017 18:15:18 +0000 (13:15 -0500)]
Remove unneeded deprecation guards

No deprecated api used in here, it seems.

8 years agoDon't place dnd cursor in placeholder text
Matthias Clasen [Sun, 17 Dec 2017 15:52:33 +0000 (10:52 -0500)]
Don't place dnd cursor in placeholder text

That is just misleading - the entire placeholder text is going
to be replaced by the drop.

8 years agodnd: Get rid of IPC widgets
Benjamin Otte [Sat, 16 Dec 2017 01:46:13 +0000 (02:46 +0100)]
dnd: Get rid of IPC widgets

Instead, pass the source window to gdk_drag_begin().

Also make Wayland use this window instead of the one under the pointer
(though those 2 Windows are most likely the same anyway).

8 years agox11: Add necessary NULL check
Benjamin Otte [Sat, 16 Dec 2017 01:24:12 +0000 (02:24 +0100)]
x11: Add necessary NULL check

8 years agodnd: Remove unused function
Benjamin Otte [Sat, 16 Dec 2017 00:54:25 +0000 (01:54 +0100)]
dnd: Remove unused function

The function was referencing itself in ways that bamboozled gcc:
  static void
  foo (void)
  {
    g_signal_handlers_disconnect_by_func (NULL, foo, NULL);
  }

Well done, function, you get your own commit!

8 years agox11: Try getting ipc_window vs source_window right
Benjamin Otte [Sat, 16 Dec 2017 00:49:01 +0000 (01:49 +0100)]
x11: Try getting ipc_window vs source_window right

This is in preparation for splitting these. Unfortunately, source_window
== ipc_window, so this isn't very debuggable yet.

8 years agox11: Use gdk_drag_context_get_display()
Benjamin Otte [Sat, 16 Dec 2017 00:40:47 +0000 (01:40 +0100)]
x11: Use gdk_drag_context_get_display()

8 years agox11: Create IPC window outselves
Benjamin Otte [Fri, 15 Dec 2017 23:17:40 +0000 (00:17 +0100)]
x11: Create IPC window outselves

Ignore the passed in IPC window.

8 years agolistbox: Fix a crash during keynav
Matthias Clasen [Fri, 15 Dec 2017 23:46:21 +0000 (18:46 -0500)]
listbox: Fix a crash during keynav

The code was asserting something that was not always holding
true. We can hit row == NULL here on page-up too. Handle that
case by moving to the first row.

https://bugzilla.gnome.org/show_bug.cgi?id=791549

8 years agodnd: Remove handler for nonexisting signal
Benjamin Otte [Fri, 15 Dec 2017 22:57:33 +0000 (23:57 +0100)]
dnd: Remove handler for nonexisting signal

The signal has been gone since e3e9bf4bea3307e9d0c6728d82f04994b069005f

8 years agogtk: Remove unused include
Benjamin Otte [Fri, 15 Dec 2017 22:53:18 +0000 (23:53 +0100)]
gtk: Remove unused include

8 years agogdk: Remove DRAG_STATUS and DROP_FINISHED events
Benjamin Otte [Fri, 15 Dec 2017 21:54:34 +0000 (22:54 +0100)]
gdk: Remove DRAG_STATUS and DROP_FINISHED events

Those are source-side events that are handled by signals of the
Dragontext these days.

8 years agox11: Avoid crash in fallback move emulation
Matthias Clasen [Fri, 15 Dec 2017 21:17:27 +0000 (16:17 -0500)]
x11: Avoid crash in fallback move emulation

Quietly do nothing when there is already an ongoing operation.
This matches the behavior of the ewmh code, and is much nicer
than a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=789054

8 years agocss: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()
Juan Pablo Ugarte [Thu, 14 Dec 2017 18:35:40 +0000 (15:35 -0300)]
css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()

https://bugzilla.gnome.org/show_bug.cgi?id=791281

8 years agoMention keymaps in the migration guide
Matthias Clasen [Fri, 15 Dec 2017 12:48:36 +0000 (07:48 -0500)]
Mention keymaps in the migration guide

Just another bullet point.

8 years agoDrop gdk_keymap_get_for_display
Matthias Clasen [Fri, 15 Dec 2017 12:46:35 +0000 (07:46 -0500)]
Drop gdk_keymap_get_for_display

It has been replaced by gdk_display_get_keymap.

8 years agoReplace gdk_keymap_get_for_display by gdk_display_get_keymap
Matthias Clasen [Fri, 15 Dec 2017 12:44:58 +0000 (07:44 -0500)]
Replace gdk_keymap_get_for_display by gdk_display_get_keymap

Replace all uses of the old function by the new one.
No functional change.

8 years agoAdd gdk_display_get_keymap
Matthias Clasen [Fri, 15 Dec 2017 11:53:13 +0000 (06:53 -0500)]
Add gdk_display_get_keymap

This is just a better name for gdk_keymap_get_for_display.

8 years agoDrop gdk_keymap_get_default()
Matthias Clasen [Fri, 15 Dec 2017 04:57:54 +0000 (23:57 -0500)]
Drop gdk_keymap_get_default()

It is better to use the explicit keymap getter - the
default display may not even use the current gdk backend.

8 years agogdk: Drop GDK_DAMAGE
Matthias Clasen [Fri, 15 Dec 2017 04:35:08 +0000 (23:35 -0500)]
gdk: Drop GDK_DAMAGE

We haven't been generating events of this type
since we dropped offscreen windows.

8 years agoDrop GDK_CLIENT_EVENT
Matthias Clasen [Fri, 15 Dec 2017 03:55:03 +0000 (22:55 -0500)]
Drop GDK_CLIENT_EVENT

We never generate events of this type, so no need
to carry it around.

8 years agogdk: Remove explicit event type numbering
Matthias Clasen [Fri, 15 Dec 2017 03:43:53 +0000 (22:43 -0500)]
gdk: Remove explicit event type numbering

The numeric values of event types are irrelevant,
so we don't need to declare them explicitly.

8 years agoMove code around
Matthias Clasen [Fri, 15 Dec 2017 03:35:27 +0000 (22:35 -0500)]
Move code around

gdk_window_set_state is now an ordinary (private) setter,
so it should live in gdkwindow.c.

8 years agogdk: Drop GdkEventWindowState
Matthias Clasen [Fri, 15 Dec 2017 03:23:01 +0000 (22:23 -0500)]
gdk: Drop GdkEventWindowState

No longer generate this event. Instead, emit change
notification for GdkWindow::state.

8 years agowidget: Remove the ::window-state-event signal
Matthias Clasen [Fri, 15 Dec 2017 03:21:21 +0000 (22:21 -0500)]
widget: Remove the ::window-state-event signal

We no longer use this signal, so remove it.

8 years agogtk: Stop handling GdkEventWindowState
Matthias Clasen [Fri, 15 Dec 2017 03:20:38 +0000 (22:20 -0500)]
gtk: Stop handling GdkEventWindowState

These events have been superseded by GdkWindow::state.

8 years agomenu: Stop using GdkEventWindowState
Matthias Clasen [Fri, 15 Dec 2017 03:19:53 +0000 (22:19 -0500)]
menu: Stop using GdkEventWindowState

These events are going away.

8 years agoa11y: Stop using GdkEventWindowState
Matthias Clasen [Fri, 15 Dec 2017 03:11:50 +0000 (22:11 -0500)]
a11y: Stop using GdkEventWindowState

These events are going way.

8 years agoheaderbar: Stop using GdkEventWindowState
Matthias Clasen [Fri, 15 Dec 2017 03:11:14 +0000 (22:11 -0500)]
headerbar: Stop using GdkEventWindowState

Use GdkWindow::state instead - the event is going away.

8 years agogtk-demo: Stop using GdkEventWindowState
Matthias Clasen [Fri, 15 Dec 2017 03:10:44 +0000 (22:10 -0500)]
gtk-demo: Stop using GdkEventWindowState

Use GdkWindow::state instead - the event is going away.

8 years agotestgtk: Stop using GdkEventWindowState
Matthias Clasen [Fri, 15 Dec 2017 03:09:13 +0000 (22:09 -0500)]
testgtk: Stop using GdkEventWindowState

Use GdkWindow::state instead - the event is going away.

8 years agogtk: Stop using GdkEventWindowState
Matthias Clasen [Fri, 15 Dec 2017 02:07:39 +0000 (21:07 -0500)]
gtk: Stop using GdkEventWindowState

We can instead use the new GdkWindow::state property
change notification. The event is going away.

8 years agogdk: Add a GdkWindow::state property
Matthias Clasen [Thu, 14 Dec 2017 23:51:38 +0000 (18:51 -0500)]
gdk: Add a GdkWindow::state property

This will eventually replace the window state event.

8 years agoFileChooser: Update set_local_only() doc’s default
Daniel Boles [Mon, 4 Dec 2017 15:09:53 +0000 (15:09 +0000)]
FileChooser: Update set_local_only() doc’s default

The property now defaults to FALSE, but the setter doc didn’t reflect it

While here, add a missing apostrophe too.

https://bugzilla.gnome.org/show_bug.cgi?id=791176

8 years agox11: Remove GdkAtom usage from dnd code
Benjamin Otte [Thu, 14 Dec 2017 12:46:37 +0000 (13:46 +0100)]
x11: Remove GdkAtom usage from dnd code

Use strings instead.

8 years agodisplay: Remove leftover old clipboard APIs
Benjamin Otte [Thu, 14 Dec 2017 12:34:40 +0000 (13:34 +0100)]
display: Remove leftover old clipboard APIs

8 years agox11: Fix erroneous & to be &&
Krzesimir Nowak [Thu, 14 Dec 2017 12:34:06 +0000 (13:34 +0100)]
x11: Fix erroneous & to be &&

8 years agox11: Get rid of default Atom converters
Benjamin Otte [Thu, 14 Dec 2017 12:02:50 +0000 (13:02 +0100)]
x11: Get rid of default Atom converters

No, using the default Wayland display is not okay to query Atoms.

8 years agodevice: Make axis label a regular string
Benjamin Otte [Thu, 14 Dec 2017 11:51:22 +0000 (12:51 +0100)]
device: Make axis label a regular string

Atoms are about to die.

8 years agoUpdate Russian translation
Stas Solovey [Thu, 14 Dec 2017 09:58:07 +0000 (09:58 +0000)]
Update Russian translation

(cherry picked from commit d69f998c260b677cda7060183649091b080c203e)

8 years agoDrop atom apis from the docs
Matthias Clasen [Thu, 14 Dec 2017 04:47:51 +0000 (23:47 -0500)]
Drop atom apis from the docs

These no longer exist.

8 years agoDrop atom-related cast macros
Matthias Clasen [Thu, 14 Dec 2017 04:47:02 +0000 (23:47 -0500)]
Drop atom-related cast macros

These don't really add anything, just drop them.

8 years agoDrop gdk_atom_intern
Matthias Clasen [Thu, 14 Dec 2017 04:39:03 +0000 (23:39 -0500)]
Drop gdk_atom_intern

Atoms are just interned strings now, so we can just
use g_intern_string.